//
//  TCPlayDecorateView.h
//
//  Created by zhangxiang on 16/8/1.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TCMsgModel.h"
#import "TCMsgHandler.h"
#import "TCMsgListTableView.h"
#import "liwuview.h"

@protocol TCPlayDecorateDelegate <NSObject>
-(void)closeVC:(BOOL)popViewController;
-(void)clickScreen:(UITapGestureRecognizer *)gestureRecognizer;
-(void)clickPlayVod;
-(void)onSeek:(UISlider *)slider;
-(void)onSeekBegin:(UISlider *)slider;
-(void)onDrag:(UISlider *)slider;
-(void)clickLog:(UIButton *)button;
-(void)clickShare:(UIButton *)button;
-(void)clickRecord:(UIButton *)button;
-(void)sendGift:(UIButton *)button;
-(void)clickPrivateChat:(UIButton *)button;
-(void)onRecvGroupDeleteMsg;
-(void)doDoubleTapped:(UITapGestureRecognizer *)sender;

// 清晰度
-(void)clickBiao:(UIButton *)button;
-(void)clickGao:(UIButton *)button;

-(void)clickDownShare:(UIButton *)button;

@end

/**
 *  播放模块逻辑view，里面展示了消息列表，弹幕动画，观众列表等UI，其中与SDK的逻辑交互需要交给主控制器处理
 */
@interface TCPlayDecorateView : UIView<UITextFieldDelegate, UIAlertViewDelegate, AVIMMsgListener, TIMGroupAssistantListener, TCAudienceListDelegate, sendGiftDelegate, UIGestureRecognizerDelegate, UITableViewDataSource, UITableViewDelegate>

@property(nonatomic,weak) id<TCPlayDecorateDelegate>delegate;
@property(nonatomic,retain)  UILabel            *playDuration;
@property(nonatomic,retain)  UISlider           *playProgress;
@property(nonatomic,retain)  UILabel            *playLabel;
@property(nonatomic,retain)  UIButton           *playBtn;
@property(nonatomic,retain)  UIButton           *btnChat;
@property(nonatomic,retain)  UIButton           *btnLog;
@property(nonatomic,retain)  UIButton           *btnShare;
@property(nonatomic,retain)  UIButton           *btnRecord;
@property(nonatomic,retain)  UIButton           *btnGift;
@property (nonatomic, strong) UIButton          *btnPrivateChat;
@property(nonatomic,retain)  UIView             *cover;
@property(nonatomic,retain)  UITextView         *statusView;
@property(nonatomic,retain)  UITextView         *logViewEvt;

@property (nonatomic, strong) UIButton          *biaoqing;
@property (nonatomic, strong) UIButton          *gaoqing;
@property (nonatomic, strong) UIView          *qingBgView;
@property (nonatomic, strong) UIButton          *btnAlert;

@property (nonatomic, retain) UIView *vChat;    // 私聊界面
@property (nonatomic, strong) UILabel *chatHead; // 私聊头
@property (nonatomic, strong) NSMutableArray *conversationArr;
@property (nonatomic, strong) NSMutableArray *chatListArr; // 列表数组
@property (nonatomic, strong) NSMutableArray *chatContentArr; // 聊天内容列表

@property (nonatomic, strong) UIButton *downShare; // 下载分享

@property(nonatomic,retain)   AVIMMsgHandler    *msgHandler;

@property (nonatomic, strong) UINavigationController *nav;

-(instancetype)initWithFrame:(CGRect)frame liveInfo:(TCLiveInfo *)liveInfo withLinkMic:(BOOL)linkmic;

-(void)setViewerCount:(int)viewerCount likeCount:(int)likeCount;

-(BOOL)isAlreadyInAudienceList:(TCMsgModel *)model;

-(void)initAudienceList;

-(void)keyboardFrameDidChange:(NSNotification*)notice;

@end
